home *** CD-ROM | disk | FTP | other *** search
Java Source | 2004-11-03 | 721 b | 26 lines |
- import com.unearthedjava.passwordPress.UnearthedPassword;
-
- /**
- * @author Larry Bullock
- *
- * A test class to show UnearthedPassword in use as a component.
- */
- public class Test {
- public static void main(String[] args) {
- try
- {
- UnearthedPassword test = new UnearthedPassword(10, // length required
- false, // allow duplicate characters
- false, // mix letter case
- UnearthedPassword.IS_ALPHANUM); // alphanumeric
- String password = test.getNewPassword();
- System.out.println(password);
- }
- catch (Exception e)
- {
- System.out.println(e.getMessage());
- }
-
- }
- }
-